<!--运行分享  跟单策略-->
<template>
  <div class="bg">
    <image class="img-bg" :src="Config.img('share_nft_bg.png')"></image>
    <template v-if="param">

      <div class="title">
        <text class="font30 text1">{{T('Vtrading')}}</text>
        <div class="title-line"></div>
        <text class="font30 text1">{{T('NFT')}}</text>

        <div class="all"></div>
        <text class="font22 color-lan">{{param.time}}</text>
      </div>

      <div class="content">

        <div class="row jcenter">
          <image class="img-logo" :src="Config.img('share_nft_logo.png')"></image>
        </div>

        <text class="font28 color-lan">{{'我的NFT资产:'}}</text>

        <view class="height10"></view>
        <view class="row aend">
          <text class="font42 fongz color-huang mb-10">{{'¥'}}</text>
          <view class="width10"></view>
          <text class="font70 fongz color-huang">{{param.totalMoney}}</text>
        </view>
        
        <view class="height10"></view>
        <view class="row acenter jbetween">
          <text class="font38 color-lan">{{'$'+param.money}}</text>
          <text class="font28 color-lan">{{'拥有'+param.totalNum+'件藏品'}}</text>
        </view>
        
        <view class="all"></view>
        <!-- <text class="font36 text1">{{'这里拥有最全的NFT情报，速来！'}}</text> -->
        <view class="all"></view>
      </div>


      <div class="info">
        <LImage class="logo" :src="Config.img('logo.png')"></LImage>
        <div class="column all">
          <text class="font24 text1">{{T('数字资产AI量化服务平台')}}</text>
          <text class="font22 text1">{{'Go with Vtrading to Victory'}}</text>
        </div>
        <div class="code-bg">
          <WeexQRCode v-if="inviteUrl" class="code" :code="inviteUrl"></WeexQRCode>
        </div>
      </div>
    </template>
  </div>
</template>

<script>

//功能
import modal from "@/_js/modal";
import math from "@/_js/math";
import Config from "@/_js/config";
import navigator from "@/_js/navigator";

const weexFunction = weex.requireModule("WeexFunction");

import I18N from "@/_i18n/i18n";
var T = I18N.t;

export default {
  data() {
    return {
      T:T,
      math:math,
      Config:Config,
      param:undefined,
      inviteUrl:'',

      keys:['time', 'totalNum', 'totalMoney', 'money']
    };
  },

  mounted() {

    weexFunction.getConfig("onlySign",(value)=>{
      this.inviteUrl = value ? (Config.inviteUrl + value) : Config.inviteUrl;
    });

    Config.init(()=>{

      var param = navigator.getParam('param');
      for (let index = 0; index < this.keys.length; index++) {
        var key = this.keys[index];
        if (param[key] == null) {
          setTimeout(() => {
            modal.toast('缺失：'+key);
          }, 200);
          return true;
        }
      }
      this.param = param;
    },[Config.OPT_UP_DOWN]);
  },

  methods: {
  }
}

</script>

<style src="@/_css/style.css" ></style>
<style scoped>
.bg {
  flex-direction: column;
  background-color: #131C61;
  width: 750px;
  min-height: 1040px;
}
.img-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
.title{
  flex-direction: row;
  align-items: center;
  margin-top: 90px;
  margin-left: 60px;
  margin-right: 60px;
}
.title-line{
  width: 1px;
  height: 35px;
  margin-right: 16px;
  margin-left: 16px;
  background-color:#8BAEF7;
}
.bg-image{
  position: absolute;
  width: 534px;
  height: 696px;

  top: 405px;
  right: 0px;
}

.content {
    flex: 1;
    flex-direction: column;
    padding: 80px 30px 0 30px;
}

.img-logo {
  width: 300px;
  height: 300px;
  margin-bottom: 80px;
}

/** 信息*/
.info{
  position: absolute;
  left: 0;
  bottom: 0;
  flex-direction: row;
  align-items: center;
  background-color: #1A2B86;
  width: 750px;
  height: 150px;
}
.logo{
  width: 72px;
  height: 72px;
  margin-left: 50px;
  margin-right: 20px;
}
.code-bg{
  justify-content: center;
  align-items: center;
  background-color: #fff;
  width: 110px;
  height: 110px;
  margin-right: 50px;
  margin-left: 20px;
}
.code{
  width: 105px;
  height: 105px;
}

/****颜色*/
.font70 {
  font-size: 70px; 
  line-height: 98px; 
  letter-spacing: 1px
}
.mb-10 {
  margin-bottom: 10px;
}
.color-lan {
  color: #9AA2DC;
}
.color-huang {
  color: #FDD000;
}
</style>